<!-- 资料收集 -->
import func from './vue-temp/vue-editor-bridge';
<template>
  <div class="viewOnlyStyle">
    <Card :bordered="false">
      <p slot="title">
        <Row>
          <Col span="12" style="line-height:32px !important"> 资料收集
          </Col>
          <Col span="12" style="text-align: right">
          <!-- <a target="_blank" href="http://xgs.letqvc.cn/home/PublicEditor"> -->
            <Button type="primary" @click="jumpPublic">公示</Button>
          <!-- </a> -->
          </Col>
        </Row>
      </p>
      <Form ref="form" :model="info" :rules="rules">
        <FormItem>
          <table id="dataCollection" ref="print" width='100%' border="1" cellspacing="0" cellpadding="0">
            <tr>
              <th colspan="4">
                资料收集表
              </th>
            </tr>
            <tr>
              <td width="25%">
                项目编号
              </td>
              <td colspan="3">
                {{info.ProjectNumber}}
              </td>
            </tr>
            <tr>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 项目名称
              </td>
              <td colspan="3">
                {{info.ProjectName}}
                <Icon type="ios-arrow-down" size='15' style="cursor:pointer" @click="viewClick($event,'projectName')" v-if='projectNameList.length>0'/>
                <Oldname v-if="projectName" :oldName="projectNameList"></Oldname>
                <!-- <FormItem prop="ProjectName">
                  <Input v-model="info.ProjectName" />
                </FormItem> -->
              </td>
            </tr>
            <tr>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 建设单位
              </td>
              <td colspan="3">
                <FormItem prop="BuildUnit">
                  <Input type='textarea' :autosize="true" v-model="info.BuildUnit" :disabled='viewOnly'/>
                </FormItem>
                <Icon type="ios-arrow-down" size='15' style="cursor:pointer" @click="viewClick($event,'buildName')" v-if='buildNameList.length>0'/>
                <Oldname v-if="buildName" :oldName="buildNameList"></Oldname>
              </td>
            </tr>
            <tr>
              <td width="25%">
                法　　人
              </td>
              <td>
                <Input v-model="info.LegalPerson" :disabled='viewOnly'/>
                <Icon type="ios-arrow-down" size='15' style="cursor:pointer" @click="viewClick($event,'LegalPerson')" v-if='LegalPersonList.length>0'/>
                <Oldname v-if="LegalPerson" :oldName="LegalPersonList"></Oldname>
              </td>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 联系人
              </td>
              <td>
                <FormItem prop="Linkman">
                  <Input v-model="info.Linkman" :disabled='viewOnly'/>
                </FormItem>
                <Icon type="ios-arrow-down" size='15' style="cursor:pointer" @click="viewClick($event,'Linkman')" v-if='LinkmanList.length>0'/>
                <Oldname v-if="Linkman" :oldName="LinkmanList"></Oldname>
              </td>
            </tr>
            <tr>
              <td width="25%">
                通讯地址
              </td>
              <td colspan="3">
                {{info.MailAddress}}
                <!-- <Input v-model="info.Mail_address" /> -->
              </td>
            </tr>
            <tr>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 联系电话
              </td>
              <td>
                <FormItem prop="TelNumber">
                  <Input v-model="info.TelNumber" :disabled='viewOnly'/>
                </FormItem>
                <Icon type="ios-arrow-down" size='15' style="cursor:pointer" @click="viewClick($event,'telnumberName')" v-if='telnumberNameList.length>0'/>
                <Oldname v-if="telnumberName" :oldName="telnumberNameList"></Oldname>
              </td>
              <td width="25%">
                邮政编码
              </td>
              <td>
                <FormItem prop='MailZipCode'>
                <Input v-model="info.MailZipCode" :disabled='viewOnly'/>
                </FormItem>
              </td>
            </tr>
            <tr>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 建设地点
              </td>
              <td colspan="3">
                {{info.BuildAddress}}
                <!-- <FormItem prop="Build_address">
                  <Input v-model="info.Build_address" />
                </FormItem> -->
              </td>
            </tr>
            <tr>
              <td width="25%">
                建设性质
              </td>
              <td>
                <RadioGroup v-model="info.BulidProperty" @on-change='selectBuild'>
                  <Radio label="新建" :disabled='viewOnly'>
                    <span>新建</span>
                  </Radio>
                  <Radio label="改扩建" :disabled='viewOnly'>
                    <span>改扩建</span>
                  </Radio>
                  <Radio label="技改" :disabled='viewOnly'>
                    <span>技改</span>
                  </Radio>
                </RadioGroup>
              </td>
              <td width="25%">
                国民经济行业类型
              </td>
              <td>
                <!-- 示例：031 牧畜饲养 -->
                <div class="adaption">
                  <Cascader :data="getNEdata" v-model="info.EconomyIndustryType" :load-data="loadNEData" change-on-select :disabled='viewOnly'></Cascader>
                </div>
                
                <!-- <Select v-model="info.Economy_industry_type" placeholder="请选择国民行业分类">
                  <Option value="畜牧业">畜牧业</Option>
                  <Option value="农副食品加工业">农副食品加工业</Option>
                  <Option value="食品制造业">食品制造业</Option>
                </Select> -->
              </td>
            </tr>
            <tr>
              <td width="25%">
                立项审批部门
              </td>
              <td>
                <Input v-model="info.ProjectApprovalUnit" :disabled='viewOnly'/>
              </td>
              <td width="25%">
                项目代码
              </td>
              <td>
                <Input v-model="info.ProjectCode" :disabled='viewOnly'/>
              </td>
            </tr>
            <tr>
              <td width="25%">
                占地面积（平方米）
              </td>
              <td>
                <FormItem prop="FloorSpace">
              <Input v-model="info.FloorSpace" :disabled='viewOnly'></Input>
            </FormItem>
              </td>
              <td width="25%">
                绿化面积（平方米）
              </td>
              <td>
               <FormItem prop="GreenSpace">
              <Input v-model="info.GreenSpace" :disabled='viewOnly'></Input>
            </FormItem>
              </td>
            </tr>
            <tr>
              <td width="25%">
                总投资（万元）
              </td>
              <td>
                <FormItem prop="TotalInvestment">
              <Input v-model="info.TotalInvestment" :disabled='viewOnly'></Input>
            </FormItem>
              </td>
              <td width="25%">
                环评合同额（万元）
              </td>
              <td>
                 <FormItem prop="ContractAmount">
              <Input v-model="info.ContractAmount" :disabled='viewOnly'></Input>
            </FormItem>
              </td>
            </tr>
            <tr>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 报告类型
              </td>
              <td>
                <!-- 示例：031 牧畜饲养 -->
                <FormItem prop="ReportSpecialItem">
                  <Cascader :data="getReportAlldata" v-model="info.ReportSpecialItem" change-on-select @on-change="getId" :clearable='false' :disabled='viewOnly'></Cascader>
                </FormItem>
              </td>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" /> 环评分类管理名录
              </td>
              <td>
                <!-- 示例：2 粮食及饲料加工 -->
                <div class="adaption1">
                  <Cascader :data="getEIAdata" v-model="info.EiaAssessCategory" change-on-select :disabled='viewOnly'></Cascader>
                </div>
                
                <!-- <FormItem prop="Eia_assess_category"> -->
                <!-- <Select v-model="info.Eia_assess_category" placeholder="请选择环评分类">
                  <Option value="稻谷种植">稻谷种植</Option>
                  <Option value="小麦种植">小麦种植</Option>
                  <Option value="小麦种植">小麦种植</Option>
                </Select> -->
                <!-- </FormItem> -->
              </td>

            </tr>
            <tr>
              <td width="25%">
                产业政策
              </td>
              <td>
                <RadioGroup v-model="info.IndustrialPolicy">
                  <Radio label="鼓励类" :disabled='viewOnly'>
                    <span>鼓励类</span>
                  </Radio>
                  <Radio label="淘汰类" :disabled='viewOnly'>
                    <span>淘汰类</span>
                  </Radio>
                  <Radio label="限制类" :disabled='viewOnly'>
                    <span>限制类</span>
                  </Radio>
                  <Radio label="允许类" :disabled='viewOnly'>
                    <span>允许类</span>
                  </Radio>
                </RadioGroup>
              </td>
              <td width="25%">
                行业准入
              </td>
              <td>
                <RadioGroup v-model="info.IndustryAccess">
                  <Radio label="符合" :disabled='viewOnly'>
                    <span>符合</span>
                  </Radio>
                  <Radio label="不符合" :disabled='viewOnly'>
                    <span>不符合</span>
                  </Radio>
                </RadioGroup>
              </td>
            </tr>
            <tr>
              <td width="25%">
                分级审批
              </td>
              <td>
                <RadioGroup v-model="info.GradeApproval">
                  <Radio label="部批" :disabled='viewOnly'>
                    <span>部批</span>
                  </Radio>
                  <Radio label="省批" :disabled='viewOnly'>
                    <span>省批</span>
                  </Radio>
                  <Radio label="市批" :disabled='viewOnly'>
                    <span>市批</span>
                  </Radio>
                  <Radio label="县批" :disabled='viewOnly'>
                    <span>县批（区批）</span>
                  </Radio>
                </RadioGroup>
              </td>
              <td width="25%">
                审批部门
              </td>
              <td>
                <Input v-model="info.ApprovalUnit" :disabled='viewOnly'/>
              </td>
            </tr>
            <tr>
              <td width="25%">
                项目合同
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.ProjectContract" :upName="upInfo.htName" UploadFileName="ProjectContract" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <!-- <UploadFiles v-model="info.Project_contract" UploadFileName="Project_contract" :UploadFileId="$route.query.Project_id"/> -->
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.ProjectContract"></DownloadButton></Col>
              </td>
              <td width="25%">
                项目委托书
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.ProjectTrustInstrument" :upName="upInfo.wtsName" UploadFileName="ProjectTrustInstrument" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.ProjectTrustInstrument"></DownloadButton></Col>
              </td>
            </tr>
            <tr v-if='isNew'>
              <td width="25%">
                原环评报告
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.OrgEiaReport" :upName="upInfo.bgName" UploadFileName="OrgEiaReport" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.OrgEiaReport"></DownloadButton></Col>
              </td>
              <td width="25%">
                原环评批复
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.OrgEiaReply" :upName="upInfo.pfName" UploadFileName="OrgEiaReply" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.OrgEiaReply"></DownloadButton></Col>
              </td>
            </tr>
            <tr v-if='isNew'>
              <td width="25%">
                原项目验收文件
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.OrgProjectAcceptanceDoc" :upName="upInfo.ysName" UploadFileName="OrgProjectAcceptanceDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.OrgProjectAcceptanceDoc"></DownloadButton></Col>
              </td>
              <td width="25%">
                原项目实际监测文件
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.OrgProjectMonitoringDoc" :upName="upInfo.jcName" UploadFileName="OrgProjectMonitoringDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.OrgProjectMonitoringDoc"></DownloadButton></Col>
              </td>
            </tr>
            <tr v-if='isNew'>
              <td width="25%">
                厂区现有平面图
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.FactoryFlatMap" :upName="upInfo.pmtName" UploadFileName="FactoryFlatMap" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.FactoryFlatMap"></DownloadButton></Col>
              </td>
              <td width="25%">
                厂区现有环保设施情况
              </td>
              <td style="text-align:left">
                <p class="feishui">废水：<Input type='textarea' :autosize="true" v-model="info.ExistingWasteWater" :disabled="viewOnly" /></p>
                <p class="feishui">废气：<Input type='textarea' :autosize="true" v-model="info.ExistingExhaustGas" :disabled="viewOnly" /></p>
                <p class="feishui">噪声：<Input type='textarea' :autosize="true" v-model="info.ExistingNoise" :disabled="viewOnly" /></p>
                <p class="feishui">固废：<Input type='textarea' :autosize="true" v-model="info.ExistingSolidWaste" :disabled="viewOnly" /></p>
              </td>
            </tr>
            <tr>
              <td width="25%">
                土地文件
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.LandDoc" :upName="upInfo.tdName" UploadFileName="LandDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.LandDoc"></DownloadButton></Col>
              </td>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" />土地相符性
              </td>
              <td>
                <FormItem prop="LandConformity">
                  <RadioGroup v-model="info.LandConformity">
                    <Radio label="符合" :disabled='viewOnly'>
                      <span>符合</span>
                    </Radio>
                    <Radio label="不符合" :disabled='viewOnly'>
                      <span>不符合</span>
                    </Radio>
                  </RadioGroup>
                </FormItem>
              </td>
            </tr>
            <tr>
              <td width="25%">
                规划文件
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.PlanningDoc" :upName="upInfo.ghName" UploadFileName="PlanningDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.PlanningDoc"></DownloadButton></Col>
              </td>
              <td width="25%">
                <Icon type="ios-medical" color="#ff6868" />规划相符性
              </td>
              <td>
                <FormItem prop="PlanningConformity">
                  <RadioGroup v-model="info.PlanningConformity">
                    <Radio label="符合" :disabled='viewOnly'>
                      <span>符合</span>
                    </Radio>
                    <Radio label="不符合" :disabled='viewOnly'>
                      <span>不符合</span>
                    </Radio>
                  </RadioGroup>
                </FormItem>
              </td>
            </tr>
            <tr>
              <td width="25%">
                立项文件
              </td>
              <td>
                <!-- <UploadFile v-model="info.Create_project_doc" UploadFileName="Create_project_doc" :UploadFileId="$route.query.Project_id" /> -->
                <Col span="12"><UploadFile v-model="info.CreateProjectDoc" :upName="upInfo.lxName" UploadFileName="CreateProjectDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.CreateProjectDoc"></DownloadButton></Col>
              </td>
              <td width="25%">
                可研/项目建议书
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.ProjectProposal" :upName="upInfo.jyName" UploadFileName="ProjectProposal" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.ProjectProposal"></DownloadButton></Col>
              </td>
            </tr>
            <tr>
              <td width="25%">
                项目平面图
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.ProjectFlatMap" :upName="upInfo.xmpmtName" UploadFileName="ProjectFlatMap" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.ProjectFlatMap"></DownloadButton></Col>
              </td>
              <td width="25%">
                其他资料
              </td>
              <td>
                <Col span="12"><UploadFile v-model="info.ProjectOtherDoc" :upName="upInfo.otherName" UploadFileName="ProjectOtherDoc" :UploadFileId="$route.query.ProjectId" :isDisabled='viewOnly'/></Col>
                <Col span="12"><DownloadButton v-if="viewOnly" :downData="downloadInfo.ProjectOtherDoc"></DownloadButton></Col>
              </td>
            </tr>
          </table>
        </FormItem>
        </td>
        </tr>
        </table>
        </FormItem>
      </Form>
      <table width='100%' border="1" cellspacing="0" cellpadding="0" style="margin-top:10px ">
        <tr>
          <th>
            <Icon type="ios-medical" color="#ff6868" />
            本项目组成员
          </th>
        </tr>
        <tr>
          <td>
            <div style="width:99%;margin:auto ">
              <!-- <Table id="groupLeader" v-if="flag" border :columns="leaderOption" :data="leaderData"></Table> -->
              <Table id="groupLeader" v-if="flag" border :columns="leaderOption" :data="leaderData"></Table>
              <Table id="xmcyz" v-if="flag" border :columns="dataAllBookOption" :data="dataAllBook"></Table>
              
            </div>
          </td>
        </tr>
        <!-- <tr>
          <td>
            添加一行
            <Button type="primary">添加</Button>
            <Button type="error">删除</Button>
            </Button>
          </td>
        </tr> -->
      </table>
      <Row style="padding:20px 0">
        <Col span="12" style="text-align: left">
        <PrintButton v-if="flag" Url="print/printCollect" :Project_id="info.Id"></PrintButton>
        </Col>
        <Col span="12" style="text-align: right">
        <Button type="primary" @click="submit('save')" :disabled='viewOnly'>
          保存
        </Button>
        <Button type="primary" @click="submit('submit')" :disabled='viewOnly'>
          提交
        </Button>
        </Col>
      </Row>
      <StepBar :status="1" :viewOnly='viewOnly'/>
    </Card>
    <Modal v-model="modal1" title="报告类型" @on-ok="ok" @on-cancel="cancel">
      <p>
        <table width='100%' border="1" cellspacing="0" cellpadding="0">
          <tr>
            <td rowspan="11">
              报告表
            </td>
            <td width="60" rowspan="8">
              一般报告表
            </td>
            <td>
              无专项
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
            <td rowspan="11">
              报告书
            </td>
            <td>
              轻工纺织化纤物
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
          </tr>
          <tr>
            <td>
              地表水环境影响专项
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
            <td>
              化工石化医药
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
          </tr>
          <tr>
            <td>
              地下水环境影响专项
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
            <td>
              冶金机电
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
          </tr>
          <tr>
            <td>
              环境风险专项
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
            <td>
              建材火电
            </td>
            <td>
              <Checkbox label="twitter" :disabled='viewOnly'>
              </Checkbox>
            </td>
          </tr>
          <tr>
            <td>
              大气环境影响专项
            </td>
            <td>
            </td>
            <td>
              农林水利
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td>
              声环境影响专项
            </td>
            <td>
            </td>
            <td>
              采掘
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td>
              工程分析环境影响专项
            </td>
            <td>
            </td>
            <td>
              交通运输
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td>
              污染防治措施专项
            </td>
            <td>
            </td>
            <td>
              社会服务
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td rowspan="3">
              核与辐 射项目 报告表
            </td>
            <td>
              无专项
            </td>
            <td>
            </td>
            <td>
              海洋工程
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td rowspan="2">
              辐射专项
            </td>
            <td>
            </td>
            <td>
              输变电及广电通讯
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td>
            </td>
            <td>
              核工业
            </td>
            <td>
            </td>
          </tr>
        </table>
      </p>
    </Modal>
  </div>
</template>
<script>
import libs from "../../../libs/uploads";
export default {
  inject: ['reload'],
  data() {
    // 手机号验证
    const validatePhone = (rule, value, callback) => {
      if (!value) {
        return callback(new Error("联系电话不能为空"));
      } else if (!/^((0\d{2,3}-\d{7,8})|(1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}))$/.test(value)) {
        callback(new Error("电话格式不正确"));
      } else {
        callback();
      }
    };
    // 邮编验证
    const validateMailCode = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (value) {
        if (!/^[0-9][0-9]{5}$/.test(value)) {
          callback(new Error("邮编格式不正确"));
        } else {
          callback();
        }
      }
    };
    const validateNum = (rule, value, callback) => {
      if (value) {
        if (!/^\d+(?=\.{0,1}\d+$|$)/.test(value)) {
          callback(new Error('请输入数字'));
        }else{
          return callback()
        }
      }else{
        return callback()
      }
    };
    // 项目名字验重
    const validateProjectName = (rule, value, callback) => {
      if(value) {
        value=value.trim()
      }
      if(!value) {
        callback(new Error('项目名称不能为空'))
      }else {
        // axios.post('/projectInformation/getProjectName',{Project_name: this.info.Project_name}).then(res=>{
        axios.post('/projectInformation/getProjectName',{ProjectName: this.info.ProjectName , ProjectId: this.info.Id}).then(res=>{
          console.log(res)
          if(res._STATUS == 1) {
            callback()
          }else {
            callback(new Error(res._MESSAGE))
          }  
        }).catch(err=>{
          console.log(err)
        })
      }
    }
    return {
      // 项目名称、建设单位、法人、联系人、联系电话留痕列表
      projectName: false,
      buildName: false,
      LegalPerson: false,
      Linkman: false,
      telnumberName: false,
      projectNameList: [], 
      buildNameList: [],  
      LegalPersonList: [],       
      LinkmanList: [],
      telnumberNameList: [],
  
      viewOnly: false,  // 允许查看
      ProjectTrustInstrument: '',
      selectNE: {},
      // leaderDisable: false, //项目负责人是否禁选
      projectStaff: {},     // 项目组成员Selected值
      leaderStaff: [],      //  项目负责人Selected
      isNew: false,         //  建设性质是否是新建
      flag: false,
      uploadUrl: "",
      projectUplod: {
        fileIDs: "",
        xmht: []
      },
      loadingStatus: false,
      //项目合同
      ProjectContract: null,
      //调用接口
      bookfirstId: "",
      //发送id
      booklastId: "",
      info: {
        ReportType: '',
        ReportSpecialItem: [],
        EconomyIndustryType: [],  //国民经济行业类型
        // Report_item: [],
      },
      getReportAlldataVal: [],
      getReportAlldata: [],
      getEIAdata: [],   //  环评分类管理名录
      getNEdata: [],    //  国民经济行业类型
      rules: {
        ProjectName: {
          required: true,
          trigger: "blur",
          message: "项目名称不能为空"
        },
        Linkman: {
          required: true,
          trigger: "blur",
          message: "联系人不能为空"
        },
        BuildUnit: {
          required: true,
          trigger: "blur",
          message: "建设单位不能为空"
        },
        LegalPerson: {
          required: true,
          trigger: "blur",
          message: "法人不能为空"
        },
        // 邮编验证
        MailZipCode: [
          { validator: validateMailCode, trigger: "blur" }
        ],
        // Tel_number: {
        //   required: true,
        //   trigger: 'blur',
        //   message: '联系电话不能为空',
        // },
        // 数字验证开始
         FloorSpace: [
          { validator: validateNum, trigger: 'blur' }
        ],
        GreenSpace: [
          { validator: validateNum, trigger: 'blur' }
        ],
        TotalInvestment: [
          { validator: validateNum, trigger: 'blur' }
        ],
        ContractAmount: [
          { validator: validateNum, trigger: 'blur' }
        ],
        // 数字验证结束
        TelNumber: [
          {
            validator: validatePhone,
            trigger: "blur"
          }
        ],
        BuildAddress: {
          required: true,
          trigger: "blur",
          message: "建设地址不能为空"
        },
        // Eia_assess_category: {
        //   required: true,
        //   trigger: 'change',
        //   message: '管理目录不能为空',
        // },
        // Report_special_item: {
        //   required: true,
        //   trigger: "change",
        //   message: "报告类型不能为空"
        // },
        ReportSpecialItem: {
          required: true,
          type: 'array',
          min: 1,
          trigger: "change",
          message: "报告类型不能为空"
        },
        LandConformity: {
          required: true,
          trigger: "change",
          message: "相符性不能为空"
        },
        PlanningConformity: {
          required: true,
          trigger: "change",
          message: "规划性不能为空"
        }
      },
      reportChapter: [],
      modal1: false,
      model1: "",
      dataAllBook: [],
      dataAllBookSelect:[],
      valueArray: [],
      dataAllBookNum:0,
      dataAllBookOption: [
        {
          type: "index",
          title: "序号",
          width: 80,
          align: "center",
          key: "num"
        },
        {
          title: "项目组成员",
          align: 'center',
          key: "name"
        },
        {
          title: "负责的章节",
          align: 'center',
          key: "reportChapter",
          render: (h, params) => {
            return h(
              "Select",
              {
                props: {
                  // value: this.dataAllBook[params.index].reportChapter,
                  value: this.projectStaff[params.index],
                  multiple: true,
                  disabled: this.viewOnly
                },
                on: {
                  "on-change": value => {
                    this.projectStaff[params.index]=value
                    console.log(value);
                    this.$nextTick(()=>{
                      this.valueArray=[]
                      for(var i=0;i<this.dataAllBookNum;i++){
                        if(this.projectStaff[i]!=undefined) {
                          this.projectStaff[i].forEach(e=>{
                            this.valueArray.push(e)
                          })
                        } 
                        this.leaderStaff.forEach(tem=>{
                          this.valueArray.push(tem)
                        })
                      }
                      let ReportChapter = value;
                      this.dataAllBookSelect.map(em=>{
                        if(em.value=='建设项目工程分析'|| em.value=='环境保护措施及其可行性论证' || em.value=='建设项目拟采取的防治措施及预期治理效果'){
                          em.disabled=true
                        }else {
                          em.disabled = false
                        }
                      })
                      this.leaderDataSelect.map(em=>{
                          em.disabled = false
                        })
                      // if(this.leaderDisable) {
                      //   this.leaderDataSelect.map(em=>{
                      //     em.disabled = true
                      //   })
                      // }else {
                      //   this.leaderDataSelect.map(em=>{
                      //     em.disabled = false
                      //   })
                      // }
                      if(this.valueArray.length>0) {
                        // value.map(e=>{
                        this.valueArray.map(e=>{
                          var dataAllBookSelect=this.dataAllBookSelect
                          dataAllBookSelect.map((item,index)=>{
                            if(item.value==e){
                                dataAllBookSelect[index].disabled=true
                            }
                          })
                        })
                        this.valueArray.map(e=>{
                          var leaderDataSelect=this.leaderDataSelect
                          leaderDataSelect.map((item,index)=>{
                            if(item.value==e){
                                leaderDataSelect[index].disabled=true
                            }
                          })
                        })
                      }else {
                        this.dataAllBookSelect.map(em=>{
                          if(em.value=='建设项目工程分析'|| em.value=='环境保护措施及其可行性论证' || em.value=='建设项目拟采取的防治措施及预期治理效果'){
                            em.disabled=true
                          }else {
                            em.disabled = false
                          }
                        })
                        this.leaderDataSelect.map(em=>{
                            em.disabled = false
                          })
                        // if(this.leaderDisable) {
                        //   this.leaderDataSelect.map(em=>{
                        //     em.disabled = true
                        //   })
                        // }else {
                        //   this.leaderDataSelect.map(em=>{
                        //     em.disabled = false
                        //   })
                        // }
                      }
                      console.log("1");
                      let id = this.dataAllBook[params.index].id;
                      axios
                        .post("/audit/updateStaffs", {
                          id,
                          ReportChapter:JSON.stringify(ReportChapter)
                        })
                        .then(res => {
                          console.log(res);
                        });
                    })
                    
                  },
                }
              },
              // this.dataAllBook[params.index].reportChapter.map(function(e) {
              this.dataAllBookSelect.map(function(e) {
                return h(
                  "Option",
                  {
                    props: {
                      value: e.value,
                      label: e.label,
                      disabled: e.disabled
                      // disabled: e.chapter=='建设项目工程分析'|| e.chapter=='环境保护措施及其可行性论证' || e.chapter=='建设项目拟采取的防治措施及预期治理效果'?true:false 
                      
                    }
                  },
                  e.value
                )
              })
            );
          }
        }
      ],
      leaderDataSelect: [],
      leaderOption: [
        {
          type: "index",
          title: '序号',
          width: 80,
          align: 'center'
        },
        {
          title: '项目负责人',
          align: 'center',
          key: 'leaderName'
        },
        {
          title: '负责的章节',
          align: 'center',
          key: 'reportChapter',
          render: (h, params)=> {
            return h(
              "Select",
              {
                props: {
                  value: this.leaderStaff,
                  multiple: true,
                  disabled: this.viewOnly
                  // disabled: this.leaderDisable
                },
                on: {
                  "on-change": value => {
                    this.leaderStaff = value
                    this.$nextTick(()=>{
                      this.valueArray=[]
                      for(var i=0;i<this.dataAllBookNum;i++){
                        if(this.projectStaff[i]!=undefined) {
                          this.projectStaff[i].forEach(e=>{
                            this.valueArray.push(e)
                          })
                        } 
                        this.leaderStaff.forEach(tem=>{
                          this.valueArray.push(tem)
                        })
                      } 
                      if(this.leaderDisable) {
                        this.leaderDataSelect.map(em=>{
                          em.disabled = true
                        })
                      }else {
                        this.leaderDataSelect.map(em=>{
                          em.disabled = false
                        })
                      }
                      this.dataAllBookSelect.map(em=>{
                        if(em.value=='建设项目工程分析'|| em.value=='环境保护措施及其可行性论证' || em.value=='建设项目拟采取的防治措施及预期治理效果'){
                          em.disabled=true
                        }else {
                          em.disabled = false
                        }
                      })
                      if(this.valueArray.length>0) {
                        // value.map(e=>{
                        this.valueArray.map(e=>{
                          var leaderDataSelect=this.leaderDataSelect
                          leaderDataSelect.map((item,index)=>{
                            if(item.value==e){
                                leaderDataSelect[index].disabled=true
                            }
                          })
                        })
                        this.valueArray.map(e=>{
                          var dataAllBookSelect=this.dataAllBookSelect
                          dataAllBookSelect.map((item,index)=>{
                            if(item.value==e){
                                dataAllBookSelect[index].disabled=true
                            }
                          })
                        })
                      }else {
                        if(this.leaderDisable) {
                          this.leaderDataSelect.map(em=>{
                            em.disabled = true
                          })
                        }else {
                          this.leaderDataSelect.map(em=>{
                            em.disabled = false
                          })
                        }
                        this.dataAllBookSelect.map(em=>{
                          if(em.value=='建设项目工程分析'|| em.value=='环境保护措施及其可行性论证' || em.value=='建设项目拟采取的防治措施及预期治理效果'){
                            em.disabled=true
                          }else {
                            em.disabled = false
                          }
                        })
                      }
                    })
                    let ReportChapter = value
                    let id = this.$route.query.ProjectId
                    axios.post("/projectInformation/findByStaffs", {
                      // Report_type:this.bookfirstId,
                      id,
                      ReportChapter:JSON.stringify(ReportChapter)
                    }).then(res => {
                      console.log(res)
                    });
                  }
                }
              },
              this.leaderDataSelect.map(function(e) {
                return h(
                  "Option",
                  {
                    props: {
                      value: e.value,
                      label: e.label,
                      disabled: e.disabled
                    }
                  },
                  e.value
                )
              })
              // this.leaderData[params.index].reportChapter.map((item)=> {
              //   return h(
              //     "Option",
              //     {
              //       props: {
              //         value: item.chapter,
              //         disabled: this.leaderDisable
              //       },
              //     },
              //     item.chapter
              //   )
              // })
            )
          }
        },
      ],
      leaderData: [],
      doc: [],
      upInfo: {
        htName: "",
        wtsName: "",
        bgName: "",
        pfName: "",
        ysName: "",
        jcName: "",
        pmtName: "",
        tdName: "",
        ghName: "",
        lxName: "",
        jyName: "",
        xmpmtName: "",
        otherName: "",
      },
      downloadInfo: {

      },
      updatedInfo: 0,
      setButton: 0,
      isOkBtn: 0,
    };
  },
  mounted() {
    this.uploadUrl = "http://39.105.60.116:8080/eao/upload.dox";
    //判断是否有ID
    if (this.$route.query.ProjectId && this.$route.query.ProjectId != "") {
      this.getProject(this.$route.query.ProjectId);
      if(this.$route.query.viewOnly==1 || localStorage.getItem('userOrg') ==7) {
        this.viewOnly = true
      }
      this.getReport();
      this.getEIA()
    } else {
      //跳转首页
      this.$router.push({
        name: "index"
      });
    }
  },
  watch: {
    // 新建 改扩建 技改
    "info.BulidProperty"() {
      this.selectBuild(this.info.BulidProperty);
    },
    // 报告类型
    'info.ReportSpecialItem'() {
      if(this.bookfirstId && this.info.ReportSpecialItem.length>0) {
        this.findByBookOrBook(this.bookfirstId);
      }
      // this.findByBookOrBook(this.info.Report_type);
    },
  },
  updated() {
    this.upDataInfo()
  },
  methods: {
    upDataInfo(){
      this.updatedInfo++
    },
    // 名字去重显示
    viewClick(e,nameShow) {
      if(!this[nameShow]) {
        e.target.className = 'ivu-icon ivu-icon-ios-arrow-up'
      }else {
        e.target.className = 'ivu-icon ivu-icon-ios-arrow-down'
      }
      this[nameShow] = !this[nameShow]
    },
    // 国民经济行业类型-导步加载
    loadNEData(item, callback) {
      item.loading = true
      var data = {Value: item.value }
        axios.post('/reportType/GBTMenu',data).then(res=>{
          if(res._STATUS == 1) {
            item.children = res.data
            item.loading = false
            callback()
          }
        }).catch(err=>{
          console.log(err)
        })   
    },
    // 国民经济行业类型
    getNE() {
      axios.post('/reportType/GBTMenu').then(res=>{
        if(res._STATUS == 1) {
          this.getNEdata = res.data
        }
      }).catch(err=>{
        console.log(err)
      })
    },
    // 环评分类管理名录
    getEIA() {
      this.$post('ProjectInfo.findAllMenu2',{}).then(res=>{
        if(res._STATUS == 1) {
          this.getEIAdata = res.data
        }
      }).catch(err=>{
        console.log(err)
      })
    },
    // 跳转公示
    jumpPublic() {
      var uId = localStorage.getItem('uId')
      var ProjectId = this.$route.query.ProjectId
      window.open(libs.uploads3() + 'home/PublicEditor?ProjectId='+ProjectId+ '&uId=' + uId)
    },
    // 选择建设性质
    selectBuild(val) {
      if (val == "新建") {
        this.isNew = false;
      } else {
        this.isNew = true;
      }
    },
    // 上传合同
    uploadSuccess(res, file) {
      // 文件上传回调 上传成功后删除待上传文件
      let that = this;
      if (res._STATUS == 1) {
        that.projectUplod.fileIDs += res.FileID + ",";
      } else {
        that.$Message.error(res.Message);
      }
    },
    /* 选中后获取到id 调用下个接口 */
    getId(value, selectedData) {
      this.flag = true;
      this.info.ReportSpecialItem = value  
      let val = value;
      this.info.ReportType = val[0]
      this.bookfirstId = val[0];
      this.findByBookOrBook(this.bookfirstId);
      this.$post("projectInformation.reportType", {
        Id: this.$route.query.ProjectId,
        ReportType: selectedData[0].label
      }).then(res => {
        });
        console.log(selectedData[0].label)
    },
    findByBookOrBook(id) {
      // axios.post("/audit/findByStaffs", {
      this.$post("audit.findByStaffs", {
          ProjectId: this.$route.query.ProjectId,
          ReportType: id
        })
        .then(res => {
          if(res._STATUS == 1) {
            this.leaderData = res.info;
            if(res.reportChapter!=undefined){
              this.leaderStaff = []
            }
            if(!(res.reportChapter==undefined||res.reportChapter==null||res.reportChapter=='')) {
              this.leaderStaff = JSON.parse(res.reportChapter)
            }
            this.leaderDataSelect=[]
            res.info[0].reportChapter.map(em=>{
              this.leaderDataSelect.push({
                value: em.chapter,
                label: em.chapter,
                // disabled: this.leaderDisable?true:false
                disabled: false
              })
            })

            this.dataAllBook = res.projectStaff;
            this.dataAllBookNum = res.projectStaff.length
            this.dataAllBookSelect=[]
            res.info[0].reportChapter.map((e)=>{
              this.dataAllBookSelect.push({
                value: e.chapter,
                label: e.chapter,
                disabled: e.chapter=='建设项目工程分析'|| e.chapter=='环境保护措施及其可行性论证' || e.chapter=='建设项目拟采取的防治措施及预期治理效果'?true:false
              })
            })
            
          }  
        });
    },
    getReport() {
      this.$post("/reportType.findAllMenu")
        .then(res => {
          if (res._STATUS == 1) {
            this.getReportAlldata = res.data;
          }
        })
        .catch(err => {
          alert("请求失败");
        });
    },
    ok() {
      this.$Message.info("Clicked ok");
    },
    cancel() {
      this.$Message.info("Clicked cancel");
    },

    /* 获取当前创建项目 */
    getProject(Id) {
      this.$post('ProjectInfo.findProjectByID', {
            Id
        })
        .then(res => {
          if(res.info.EconomyIndustryType == '未识别'){
            res.info.EconomyIndustryType = '[]'
          }
          if(res._STATUS == 1) {
            this.ProjectTrustInstrument = res.doc.ProjectTrustInstrument    
            res.projectStaff.forEach((item,index) => {
              if(item.ReportChapter) {
                this.projectStaff[index] = JSON.parse(item.ReportChapter) 
              }
            });
            // 加定时器让报告类型执行查找项目负责人数据（因查找数据有清空leaderStaff=[]操作）
            setTimeout(()=>{
              if(res.info.ReportChapter) {
                this.leaderStaff = []
                this.leaderStaff = JSON.parse(res.info.ReportChapter)
                console.log(this.leaderStaff);
              }
            },1000)
            if(res.info.ReportSpecialItem) {
              res.info.ReportSpecialItem = JSON.parse(res.info.ReportSpecialItem)
              if(res.info.ReportSpecialItem.length>0){
                this.bookfirstId = res.info.ReportSpecialItem[0]
                this.flag = true;
              } 
            }
            res.info.EconomyIndustryType = JSON.parse(res.info.EconomyIndustryType)
            res.info.EiaAssessCategory = JSON.parse(res.info.EiaAssessCategory )
            // console.log(res.info.Economy_industry_type)
            // 有值默认选中-国民经济分类
            if(res.info.EconomyIndustryType.length>0 && res.info.EconomyIndustryType != '未识别'){ 
              // console.log('返回为空')
              axios.post('/reportType/GBTMenu2',{EconomyIndustryType: JSON.stringify(res.info.EconomyIndustryType)}).then(res=>{
                // console.log(res)
                this.getNEdata = res.list
              }).catch(err=>{
                console.log(err)
              }) 
            }else {
              this.getNE()
            }
            this.info = res.info;
            console.log(res.info)
            // if(res.pt2List.length>0) {
            //   if (this.info.Project_name == res.pt2List[res.pt2List.length - 1].Project_name) {
            //     this.oldNameShow = false
            //     this.pt2List = []
            //   }else {
            //     let pt2List = []
            //     let pt2ListAll = res.pt2List
            //     for(var i=0; i<pt2ListAll.length; i++) {
            //   　　var flag = true;
            //   　　for(var j=0;j<pt2List.length;j++){
            //   　　　　if(pt2ListAll[i].Project_name == pt2List[j].Project_name){
            //   　　　　　　flag = false;
            //   　　　　};
            //   　　}; 
            //   　　if(flag){
            //         pt2List.push(pt2ListAll[i]);
            //   　　};
            //     }
            //     this.pt2List = pt2List
            //   }
            // }
            if(res.pt2List.length>0) {
              var arrAll = res.pt2List //所有更改记录
              function arrayUnique2(arr, ProjectName) {
                var hash = {};
                return arr.reduce(function (item, next) {
                  hash[next[ProjectName]] ? '' : hash[next[ProjectName]] = true && item.push(next);
                  return item;
                }, []);
              }
              var projectNameList = arrayUnique2(arrAll, "ProjectName")
              if(projectNameList[0].ProjectName==this.info.ProjectName) {
                projectNameList = arrayUnique2(arrAll, "ProjectName").slice(1)
              }
              projectNameList.forEach(e => {
                this.projectNameList.push({name: e.ProjectName,Operator: e.Operator,UpdateTime: e.UpdateTime})
              });

              var buildNameList = arrayUnique2(arrAll, "BuildUnit")
              if(buildNameList[0].BuildUnit==this.info.BuildUnit) {
                buildNameList = arrayUnique2(arrAll, "BuildUnit").slice(1)
              }
              buildNameList.forEach(e => {
                this.buildNameList.push({name: e.BuildUnit,Operator: e.Operator,UpdateTime: e.UpdateTime})
              });

              var LegalPersonList = arrayUnique2(arrAll, "LegalPerson")
              if(LegalPersonList[0].LegalPerson==this.info.LegalPerson) {
                LegalPersonList = arrayUnique2(arrAll, "LegalPerson").slice(1)
              }
              LegalPersonList.forEach(e => {
                this.LegalPersonList.push({name: e.LegalPerson,Operator: e.Operator,UpdateTime: e.UpdateTime})
              });

              var LinkmanList =  arrayUnique2(arrAll, "Linkman")
              if(LinkmanList[0].Linkman==this.info.Linkman) {
                LinkmanList =  arrayUnique2(arrAll, "Linkman").slice(1)
              }
              LinkmanList.forEach(e => {
                this.LinkmanList.push({name: e.Linkman,Operator: e.Operator,UpdateTime: e.UpdateTime})
              });

              var telnumberNameList = arrayUnique2(arrAll, "TelNumber")
              if(telnumberNameList[0].TelNumber==this.info.TelNumber) {
                telnumberNameList = arrayUnique2(arrAll, "TelNumber").slice(1)
              }
              telnumberNameList.forEach(e => {
                this.telnumberNameList.push({name: e.TelNumber,Operator: e.Operator,UpdateTime: e.UpdateTime})
              });
              // console.log(arrayUnique2(arrAll, "Project_name"))
              // console.log(arrayUnique2(arrAll, "Build_unit"))
              // console.log(arrayUnique2(arrAll, "Legal_person"))
              // console.log(arrayUnique2(arrAll, "Linkman"))
              // console.log(arrayUnique2(arrAll, "Tel_number"))              
            }
            // console.log(res.info)
            // var Report_item = res.info.Report_special_item.split(',')
            // this.info.Report_item = Report_item
            // debugger
            // var Report_item = res.info.Report_item
            // debugger
            // this.info.Report_special_item = Report_item
            localStorage.projectType = this.info.PerjectType;
            // console.log(res.doc)
            //上传字段显示
            this.upInfo.htName = this.upWord(res.doc.ProjectContract)
            this.upInfo.wtsName = this.upWord(res.doc.ProjectTrustInstrument)
            this.upInfo.bgName = this.upWord(res.doc.OrgEiaReport)
            this.upInfo.pfName = this.upWord(res.doc.OrgEiaReply)
            this.upInfo.ysName = this.upWord(res.doc.OrgProjectAcceptanceDoc)
            this.upInfo.jcName = this.upWord(res.doc.OrgProjectMonitoringDoc)
            this.upInfo.pmtName = this.upWord(res.doc.FactoryFlatMap)
            this.upInfo.tdName = this.upWord(res.doc.LandDoc)
            this.upInfo.ghName = this.upWord(res.doc.PlanningDoc)
            this.upInfo.lxName = this.upWord(res.doc.CreateProjectDoc)
            this.upInfo.jyName = this.upWord(res.doc.ProjectProposal)
            this.upInfo.xmpmtName = this.upWord(res.doc.ProjectFlatMap)
            this.upInfo.otherName = this.upWord(res.doc.ProjectOtherDoc)
          }
          this.downloadInfo = res.doc
          console.log(this.downloadInfo)
        })
        .catch(err => {
          console.log(err)
        });
    },
    // 保存 save / 提交 submit
    submit(type) {
      // 对于提交进行 验证 负责章节

      // 项目负责人 负责的章节
      let leaderStaffCount = this.leaderStaff.length
      console.log(leaderStaffCount)
      if (!leaderStaffCount) {
        this.$Message.error('项目负责人 负责的章节 不能为空')
        return
      }
      // 项目组成员 负责的章节
      let dataAllBookSelectCount = this.dataAllBookSelect.length,
          projectStaff = this.projectStaff

      for (let key in projectStaff) {
        debugger
        let info = projectStaff[key],
            infoCount = info.length

        // if (!infoCount) {
        //   this.$Message.error('项目组成员 负责的章节 不能为空')
        //   return
        // }

        leaderStaffCount = infoCount + leaderStaffCount
      }

      if (dataAllBookSelectCount > leaderStaffCount) {
          this.$Message.error('有未选择的 负责章节')
          return
      }
      if(type == 'save'){   //保存
        if(this.setButton == 0){
          this.$refs.form.validate(valid => {
            if (!valid) {
              document.documentElement.scrollTop = 300
              return;
            }
            this.setButton = 1
            setTimeout(()=>{this.setButton = 0},60000)
            // let info = this.info;
            // let info = Object.assign({}, this.info);
            let info = JSON.parse(JSON.stringify(this.info));
            info.ReportSpecialItem = JSON.stringify(info.ReportSpecialItem)
            info.EconomyIndustryType = JSON.stringify(info.EconomyIndustryType)
            info.EiaAssessCategory = JSON.stringify(info.EiaAssessCategory)
            info.BtnWay = type == "save" ? 1 : 2;
            info.PerjectType = type == "save" ? 2 : 2;
            // debugger
            axios.post("/projectInformation/saveOrUpdateProject", info).then(res => {
                if (res._STATUS == 1) {
                  let title = res._MESSAGE;
                  if (type == "save") {
                    this.$Modal.success({
                      title
                    });
                  } else {
                    this.$router.push({
                      name: "reconnaissanceTrip",
                      query: {
                        ProjectId: this.$route.query.ProjectId
                      }
                    });
                  }
                } else {
                  // 提示
                  this.$Modal.error({
                    title:res._MESSAGE
                  });
                }
              }).catch(err => {
                console.log(err)
              });
          });
        }else{
          this.$Message.warning('连续点击保存时间过短，最少间隔1分钟!')
        }
      }else{    //提交
        if(this.isOkBtn == 0){
          this.$refs.form.validate(valid => {
            if (!valid) {
              document.documentElement.scrollTop = 300
              return;
            }
            this.isOkBtn = 1
            setTimeout(()=>{this.isOkBtn = 0},60000)
            // let info = this.info;
            let info = Object.assign({}, this.info);
            info.ReportSpecialItem = JSON.stringify(info.ReportSpecialItem)
            info.EconomyIndustryType = JSON.stringify(info.EconomyIndustryType)
            info.EiaAssessCategory = JSON.stringify(info.EiaAssessCategory)
            info.BtnWay = type == "save" ? 1 : 2;
            info.PerjectType = type == "save" ? 2 : 2;
            // debugger
            axios.post("/projectInformation/saveOrUpdateProject", info).then(res => {
                if (res._STATUS == 1) {
                  let title = res._MESSAGE;
                  if (type == "save") {
                    this.$Modal.success({
                      title
                    });
                  } else {
                    this.$router.push({
                      name: "reconnaissanceTrip",
                      query: {
                        ProjectId: this.$route.query.ProjectId
                      }
                    });
                  }
                } else {
                  // 提示
                  this.$Modal.error({
                    title:res._MESSAGE
                  });
                }
              }).catch(err => {
                console.log(err)
              });
          });
        }else{
          this.$Message.warning('连续点击提交时间过短，最少间隔1分钟!')
        }
      }

      // if(this.setButton == 0){
      //   this.setButton = 1
      //   setTimeout(()=>{this.setButton = 0},60000)
      // if (type == 'submit'||type == 'save') {
      //   // 项目负责人 负责的章节
      //   let leaderStaffCount = this.leaderStaff.length
      //   if (!leaderStaffCount) {
      //     this.$Message.error('项目负责人 负责的章节 不能为空')
      //     return
      //   }

      //   // 项目组成员 负责的章节
      //   let dataAllBookSelectCount = this.dataAllBookSelect.length,
      //       projectStaff = this.projectStaff

      //   for (let key in projectStaff) {
      //     let info = projectStaff[key],
      //         infoCount = info.length

      //     if (!infoCount) {
      //       this.$Message.error('项目组成员 负责的章节 不能为空')
      //       return
      //     }

      //     leaderStaffCount = infoCount + leaderStaffCount
      //   }

      //   if (dataAllBookSelectCount != leaderStaffCount) {
      //       this.$Message.error('有未选择的 负责章节')
      //       return
      //   }
      // }

      // // 验证
      // this.$refs.form.validate(valid => {
      //   if (!valid) {
      //     return;
      //   }
      //   // let info = this.info;
      //   let info = Object.assign({}, this.info);
      //   info.Report_special_item = JSON.stringify(info.Report_special_item)
      //   info.Economy_industry_type = JSON.stringify(info.Economy_industry_type)
      //   info.Eia_assess_category = JSON.stringify(info.Eia_assess_category)
      //   info.btn_way = type == "save" ? 1 : 2;
      //   info.Perject_type = type == "save" ? 2 : 2;
      //   // debugger
      //   axios.post("/projectInformation/saveOrUpdateProject", info).then(res => {
      //       if (res._STATUS == 1) {
      //         let title = res._MESSAGE;
      //         if (type == "save") {
      //           this.$Modal.success({
      //             title
      //           });
      //         } else {
      //           this.$router.push({
      //             name: "reconnaissanceTrip",
      //             query: {
      //               Project_id: this.$route.query.Project_id
      //             }
      //           });
      //         }
      //       } else {
      //         // 提示
      //         this.$Modal.error({
      //           title:res._MESSAGE
      //         });
      //       }
      //     })
      //     .catch(err => {
      //       console.log(err)
      //     });
      // });
      // }else{
      //   this.$Message.warning('请勿重复提交!')
      // }
    },
    upWord(url){        //分割字符串
      if(url == null){
        return '上传'
      }else{
        var upWord = url;
        upWord = upWord.split("/");
        upWord = upWord.slice(-1);
        upWord = upWord.join('');
        // console.log(upWord)
        return upWord
      }
    }
  }
};
</script>
<style lang="less">
#dataCollection {
  td {
    padding: 5px;
  }
  #groupLeader {
    .ivu-table-tip {
      overflow-x: hidden;
    }
  }
  #xmcyz {
    .ivu-table-tip {
      overflow-x: hidden;
    }
  }
  textarea.ivu-input {
    font-size: 12px;
  }
  .ivu-input {
    border: none;
    text-align: center;
    height: 30px;

    input {
      outline: medium;
    }
  }

  .ivu-cascader {
    border: 1px solid #dcdee2;
    border-radius: 4px;
  }

  .feishui .ivu-input-wrapper {
    width: auto;
    border: 1px solid #dcdee2;
    border-radius: 4px;
    margin-left: 5px;
  }
  .adaption .ivu-select-dropdown{
    right: 0 !important;
    left: auto !important;
  }
  .adaption1 .ivu-select-dropdown {
    right: 0 !important;
    left: auto !important;
  }
  .ivu-input[disabled], fieldset[disabled] .ivu-input {
    background-color: #fff; 
    color: #333;
    font-size: 12px;
    
  }
  .ivu-select-disabled .ivu-select-selection {
    background-color: #fff;
    color: #333;
    border: 0;
  }
}
</style>